﻿using System;
using System.Windows.Input;
using iStudio.Structure.Message;

namespace iStudio.View.Dialog
{
    /// <summary>
    /// Interaction logic for Preferences.xaml
    /// </summary>
    public partial class Preferences : IObserver<SettingMessage>
    {
        public Preferences()
        {
            InitializeComponent();

            Manager.Manager.Instance.SettingManager.Subscribe (this);
        }

        private void CreateTree ()
        {
            
        }

        private void CloseButtonMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            Close();
        }

        private void HeaderMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton == MouseButtonState.Pressed)
            {
                DragMove();
            }
        }

        private void SettingTreeSelectedItemChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
        {
            if (setting_tree.SelectedItem != null)
            {
                
            }
        }

        public void OnNext (SettingMessage value)
        {
            throw new NotImplementedException ();
        }

        public void OnError (System.Exception error)
        {
            throw new NotImplementedException ();
        }

        public void OnCompleted ()
        {
            throw new NotImplementedException ();
        }
    }
}
